From f7f847adff7d819c6f1df5472b8c59e8375c60b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 2 Feb 2004 20:51:18 +0000 Subject: [PATCH] (Fcopy_file): If NEWNAME is a directory, expand the basename of FILE relative to it, not FILE itself. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index c7959b3672d..73771591994 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2407,7 +2407,7 @@ Also set the file modes of the target file to match the source file. */) CHECK_STRING (newname); if (!NILP (Ffile_directory_p (newname))) - newname = Fexpand_file_name (file, newname); + newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); else newname = Fexpand_file_name (newname, Qnil); -- 2.30.2